Test Failed
Push — master ( 853a48...344ee9 )
by Emil
02:45
created

index.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 1
rs 10
c 0
b 0
f 0
1
const express = require('express');
2
const path = require("path");
3
const router = express.Router();
4
5
const authModel = require("./models/auth.js");
6
7
const auth = require("./route/auth.js");
8
const copier = require("./route/copier.js");
9
const deliveries = require("./route/deliveries.js");
10
const invoices = require("./route/invoices.js");
11
const orderItems = require("./route/order_items.js");
12
const orders = require("./route/orders.js");
13
const products = require("./route/products.js");
14
15
router.all('*', authModel.checkAPIKey);
16
17
router.get('/', (req, res) => res.sendFile(path.join(__dirname + '/documentation.html')));
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
18
19
router.use("/auth", auth);
20
router.use("/copier", copier);
21
router.use("/deliveries", deliveries);
22
router.use("/invoices", invoices);
23
router.use("/order_items", orderItems);
24
router.use("/orders", orders);
25
router.use("/products", products);
26
27
module.exports = router;
28